package kuaizu.common.template;

import lombok.Data;

/**
 * @author: wangmx15
 * @date: 2025/8/24
 * 定时订阅消息通知模板
 **/
@Data
public class ProjectPromotionTemp {

    //匹配信息 项目名
    private thing1 thing1;
    ///匹配理由 描述提示词
    //private thing2 thing2;
    //匹配数量 当前申请人数
    //private number8 number8;
    //报名人数
    private short_thing4 short_thing4;
    //商家提示
    private thing5 thing5;


    @lombok.Data
    public static class thing1 {
        private String value;

    }

    @lombok.Data
    public static class thing2 {
        private String value;
    }

    @lombok.Data
    public static class short_thing4 {
        private String value;

    }

    @lombok.Data
    public static class number8 {
        private Integer value;
    }

    @lombok.Data
    public static class thing5 {
        private String value = "请在我的-我的组队中及时处理哦";

    }


    //设置模板参数
    public void setTemplateParam(String projectName, Integer num) {
        this.thing1 = new thing1();
        this.short_thing4= new short_thing4();
        this.thing5 = new thing5();
        if (projectName.length() > 20) {
            String substring = projectName.substring(0, 16);
            projectName=substring+"...";
        }
        thing1.setValue(projectName);
        this.short_thing4.setValue(num+"人");

    }

}
